<template>
  <div>
    <h3><span class="badge bg-primary">分析对比</span></h3>
    <div class="row gx-2 gx-lg-3">
      <div class="col-sm-6 col-lg-2 mb-3 mb-lg-5">
        <div class="card">
          <ul class="list-group list-group-flush">
            <li class="list-group-item btn btn-primary">农产品</li>
          </ul>
        </div>
      </div>
      <div class="col-sm-6 col-lg-10 mb-3 mb-lg-5">
        <div class="container">
          <div class="row p-4 pe-lg-0 pt-lg-5 shadow-lg">
            <div class="row">
              <div class="col-lg-2">
                <button class="btn btn-primary" v-on:click="showPriceChange()">
                  价格走势
                </button>
              </div>
              <div class="col-lg-2">
                <button class="btn btn-success" v-on:click="showPriceCompare()">
                  价格对比
                </button>
              </div>
            </div>
            <div class="row"><br /><br /></div>
            <priceChange v-show="priceChange"></priceChange>
            <priceCompare v-show="priceCompare"></priceCompare>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import priceChange from "@/components/government/priceChange";
import priceCompare from "@/components/government/priceCompare";
export default {
  data() {
    return {
      cate: "榴莲",
      priceChange: true,
      priceCompare: false,
    };
  },
  components: {
    priceChange: priceChange,
    priceCompare: priceCompare,
  },
  methods: {
    showPriceChange() {
      this.priceChange = true;
      this.priceCompare = false;
    },
    showPriceCompare() {
      this.priceChange = false;
      this.priceCompare = true;
    },
  },
};
</script>